var request = global.request
function dorequest(data) {
    if (!data.sessionkey && global.sessionkey) {
        data.sessionkey = global.sessionkey
    }
    return request.request(data);
}

//上传附件
export function uploadimg(tempFilePath){
  let req={
      url:'/user/uploadPic',
      filePath: tempFilePath,
      name: 'file',
      header:{
        'content-type': 'multipart/form-data',
        'X-Request-ID-WFY':new Date().getTime()
      }
  }
  return uploadFile(req)
}
//获取短信验证码
export function sendCode(data){
        let req={
            url:'/user/sendCode',
            method:'POST',
            header:{
                'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
            },
            data:data
        }
        return dorequest(req)
    }
//绑定手机号注册
export function register(data){
    let req={
        url:'/user/register',
        method:'POST',
        header:{
            'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
        },
        data:data
    }
    return dorequest(req)
}
//登录a
export function logina(data){
  let req={
      url:'/user/loginA',
      method:'POST',
      header:{
          'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
      },
      data:data
  }
  return dorequest(req)
}
//登录b
export function loginb(data){
  let req={
      url:'/user/loginB',
      method:'POST',
      header:{
          'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
      },
      data:data
  }
  return dorequest(req)
}
//获取职位列表- 阿姨端
export function auntList(data){
  let req={
      url:'/aunt/auntList',
      method:'POST',
      header:{
          'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
      },
      data:data
  }
  return dorequest(req)
}
//获取职位列表- 阿姨端
export function auntdetails(data){
  let req={
      url:'/aunt/auntDetail',
      method:'POST',
      header:{
          'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
      },
      data:data
  }
  return dorequest(req)
}
//获取公司详情
export function companyQuery(data){
  let req={
      url:'/company/companyQuery',
      method:'POST',
      header:{
          'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
      },
      data:data
  }
  return dorequest(req)
}
//获取发布列表- 阿姨端
export function myList(data){
  let req={
    url:'/aunt/mine/myList',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return ddorequest(req)
}
//获取发布详情- 阿姨端
export function fbdetail(data){
  let req={
    url:'/aunt/mine/myDetail',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return ddorequest(req)
}
//发布- 阿姨端
export function publishSave(data){
  let req={
    url:'/publish/publishSave',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//个人资料修改
export function information(data){
  let req={
    url:'/user/information',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//发布刷新
export function resetPublish(data){
  let req={
    url:'/aunt/mine/resetPublish',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//业主 阿姨列表
export function ownerList(data){
  let req={
    url:'/owner/ownerList',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//业主 阿姨详情
export function ownerDetail(data){
  let req={
    url:'/owner/ownerDetail  ',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//业主 关注/取消关注
export function follow(data){
  let req={
    url:'/owner/follow  ',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//业主 我的关注列表
export function followList(data){
  let req={
    url:'/owner/followList',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//我的发布 列表
export function fbmyList(data){
  let req={
    url:'/aunt/mine/myList',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//获取小区列表
export function getarea(){
  let req={
    url:'/user/area',
    method:'GET',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:{}
  }
  return dorequest(req)
}
//分享列表
export function getshare(data){
  let req={
    url:'/share/shareList',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//上传资质证明
export function proveImg(data){
  let req={
    url:'/user/insertImg',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//分享详情
export function fxdetail(data){
  let req={
    url:'/share/shareDetail',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//作废
export function delPublish(data){
  let req={
    url:'/aunt/mine/delPublish',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//公司端 阿姨求职列表
export function houseList(data){
  let req={
    url:'/house/houseList',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//公司端 录用
export function employ(data){
  let req={
    url:'/house/employ',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//公司端 分享
export function gssharelist(data){
  let req={
    url:'/house/shareList',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//公司端 录用列表
export function employlist(data){
  let req={
    url:'/house/employList',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//公司端 发布阿姨
export function publish(data){
  let req={
    url:'/house/publish',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//公司端 接单
export function ownerChoose(data){
  let req={
    url:'/house/ownerChoose',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//公司端 我发布的招聘列表
export function minePublishList(data){
  let req={
    url:'/house/minePublishList',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//公司端 阿姨详情
export function houseDetail(data){
  let req={
    url:'/house/houseDetail',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//公司 业主列表
export function yzList(data){
  let req={
    url:'/house/ownerList',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//公司 业主列表
export function displayimg(data){
  let req={
    url:'/house/displayImage',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//公司 我的招聘发布详情
export function mineHouseDetail(data){
  let req={
    url:'/house/mineHouseDetail',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//小区查询接口
export function areaKeyword(data){
  let req={
    url:'/user/areaKeyword',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//获取用户基本信息
export function userbasic(data){
  let req={
    url:'/user/userbasic',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//获取用户手机号
export function decryptParam(data){
  let req={
    url:'/user/decryptParam',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//分享页面
export function sharepage(data){
  let req={
    url:'/share/share',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//资质保存
export function saveImg(data){
  let req={
    url:'/user/saveImg',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
//资质保存
export function cityType(data){
  let req={
    url:'/user/cityType',
    method:'POST',
    header:{
      'content-type':'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data:data
  }
  return dorequest(req)
}
